import  request  from "@/utils/axios";
import appName from "../appName"
const timeout = 900000;

// 获取项目属性
export function getItemspropertiesApi(params) {
  return request({
    url: appName.AUSCONFING + `/aus/physicalExaminationRule/getItemsproperties?itemsCode=${params.id}&flag=${params.flag}`,
    method: 'post',
    data: params,
    timeout:timeout
  })
}

// -------------------------------             体检分级规则API          ------------------------

// 获取体检评级规则配置
export function getAusAsstntScorRuleInfoApi(params) {
  return request({
    url: appName.AUSCONFING + `/aus/physicalExaminationRule/getAusAsstntScorRuleInfo?itemsCode=${params.id}`,
    method: 'post',
    timeout:timeout
  })
}

// 保存体检评级规则配置
export function saveAusAsstntScorRuleInfoeApi(params) {
  return request({
    url: appName.AUSCONFING + '/aus/physicalExaminationRule/saveAusAsstntScorRuleInfo',
    method: 'post',
    data: params,
    timeout:timeout
  })
}

// 删除体检评级规则配置
export function deleteAusAsstntScorRuleInfoApi(params) {
  return request({
    url: appName.AUSCONFING + `/aus/physicalExaminationRule/deleteAusAsstntScorRuleInfo?id=${params.id}`,
    method: 'get',
    timeout:timeout
  })
}

// -------------------------------             特殊评分规则API          ------------------------
// 获取体检评级特殊规则表
export function getAusAsstntScorSpecialRuleApi(params) {
  return request({
    url: appName.AUSCONFING + `/aus/specialRule/getAusAsstntScorSpecialRule?itemsCode=${params.id}`,
    method: 'post',
    timeout:timeout
  })
}

// 保存体检评级特殊规则
export function saveAsstntScorSpecialRuleApi(params) {
  return request({
    url: appName.AUSCONFING + '/aus/specialRule/saveAsstntScorSpecialRule',
    method: 'post',
    data: params,
    timeout:timeout
  })
}

// 删除核保结论规则
export function deletAusAsstntScorSpecialRuleApi(params) {
  return request({
    url: appName.AUSCONFING + `/aus/specialRule/deletAusAsstntScorSpecialRule?id=${params.id}`,
    method: 'get',
    timeout:timeout
  })
}

// -------------------------------             核保结论规则API          ------------------------
// 获取核保结论规则
export function getUnderwritingConclusionsRuleApi(params) {
  return request({
    url: appName.AUSCONFING + `/aus/underwritingConclusions/getUnderwritingConclusionsRule?itemsCode=${params.id}`,
    method: 'post',
    timeout:timeout
  })
}

// 保存核保结论规则
export function saveUnderwritingConclusionsRuleApi(params) {
  return request({
    url: appName.AUSCONFING + '/aus/underwritingConclusions/saveUnderwritingConclusionsRule',
    method: 'post',
    data: params,
    timeout:timeout
  })
}

// 删除核保结论规则
export function deletUnderwritingConclusionsRuleApi(params) {
  return request({
    url: appName.AUSCONFING + `/aus/underwritingConclusions/deletUnderwritingConclusionsRule?id=${params.id}`,
    method: 'get',
    timeout:timeout
  })
}



